//
//  CueTableViewCell.swift
//  SwitfTest
//
//  Created by runone02 on 2019/1/15.
//  Copyright © 2019年 liqiyun. All rights reserved.
//

import UIKit

class CueTableViewCell: UITableViewCell {
    
    var titelLabel : UILabel!
    /// 显示信息条数
    var messageView:JWMessageView!
    required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
    }
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        self.selectionStyle = UITableViewCell.SelectionStyle(rawValue: 0)!
        self.separatorInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
        self.setUpUI()
    }
    
    func setUpUI() {
        titelLabel = UILabel()
        titelLabel.textColor = UIColor.black
        titelLabel.font = UIFont.systemFont(ofSize: 15)
        self.addSubview(titelLabel)
        titelLabel.mas_makeConstraints { (make) in
            make?.centerY.mas_equalTo()(self)
            make?.left.mas_equalTo()(self)?.offset()(20)
        }
        
        messageView = JWMessageView.init(frame: CGRect(x: SCREEN_WIDTH-60, y: 10, width: 60, height: 20))
        messageView.messageCount = 10
        self.addSubview(messageView)
    }


    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)
        self.messageView.messageCount = Int(arc4random_uniform(100))
        // Configure the view for the selected state
    }
    

}
